// 登录相关接口
import axios from '@/api/request/request'

// 分页获取banner
const getBannerPage = (option: any) => {
  return axios.post('/news/banner/getBannerPage', {
    ...option
  })
}

// 添加banner
const addBanner = (option: any) => {
  return axios.post('/news/banner/addBanner', {
    ...option
  })
}

// 更新banner
const updateBanner = (option: any) => {
  return axios.post('/news/banner/updateBanner', {
    ...option
  })
}

// 删除banner
const deleteBanner = (option: any) => {
  return axios.post('/news/banner/deleteBanner', {
    ...option
  })
}

// 切换banner状态（启用或停用）
const changeBannerStatus = (option: any) => {
  return axios.post('/news/banner/changeBannerStatus', {
    ...option
  })
}

// 获取详情
const getBannerInfo = (option: any) => {
  return axios.post('/news/banner/getBannerInfo', {
    ...option
  })
}

// banner排序
const reorderBanner = (option: any) => {
  return axios.post('/news/banner/reorderBanner', option)
}

// 获取banner排序列表
const getBannerList = (option: any) => {
  return axios.post('/news/banner/getBannerList', {
    ...option
  })
}

export { getBannerPage, addBanner, updateBanner, deleteBanner, changeBannerStatus, getBannerInfo, reorderBanner, getBannerList }
